---
description: "Swift documentation for 'SIMD'"
root: "/v5.1"
keywords: ""
layout: "default"
title: "SIMD"
---

<div class="intro-declaration"><code class="language-swift">protocol SIMD</code></div><p>A SIMD vector of a fixed number of elements.</p>
<table class="standard"><tr><th id="inheritance">Inheritance</th><td><code class="inherits">CustomStringConvertible, Decodable, Encodable, ExpressibleByArrayLiteral, Hashable, SIMDStorage</code></td></tr><tr><th id="conforming-types">Conforming Types</th><td><code class="inherits">SIMD16, SIMD2, SIMD3, SIMD32, SIMD4, SIMD64, SIMD8, SIMDMask</code></td></tr><tr><th id="associatedtypes">Associated Types</th><td><span id="aliasesmark"></span><div class="declaration"><code class="language-swift">associatedtype MaskStorage</code><div class="comment"></div></div></td></tr></table><div class="discussion comment"></div><h3>Default Implementations</h3><div id="scalarCount-2c88ac4714aa7276da0950dfc969879e" class="declaration"><a class="toggle-link" href="#comment-scalarCount-2c88ac4714aa7276da0950dfc969879e">var scalarCount</a> <div class="comment collapse in" id="comment-scalarCount-2c88ac4714aa7276da0950dfc969879e"><p>The number of scalars, or elements, in a vector of this type.</p>
<h4>Declaration</h4><code class="language-swift">var scalarCount: Int</code></div></div>